import axios from 'axios';

axios.defaults.timeout = 5000;
axios.defaults.baseURL = '';

//http request 拦截器
axios.interceptors.request.use(config => {
	console.log('request', config);
	return config;
}, error => {
	return Promise.reject(error);
});


//http response 拦截器
axios.interceptors.response.use(response => {
	console.log('response', response);
	return response;
}, error => {
	return Promise.reject(error)
})

export default axios;